#define  _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
//#include<string.h>
#include<assert.h>

void my_strcpy(char* dest, const char* source,size_t num)
{
	assert(dest && source);
	while (num) {
		*dest++ = *source++;
		num--;
	}
}
int main()
{
	char arr1[] = "abcdefg";
	char arr2[] = "hijklmn";
	int n = 3;
	my_strcpy(arr1, arr2,n);
	printf("%s", arr1);
	return 0;
}